function repair(m: string | number) {
    return m < 10 ? '0' + m : m
  }
  export function formatting(time: string) {
    var times = new Date(time);
    var y = times.getFullYear();
    var m = times.getMonth() + 1;
    var d = times.getDate();
    var h = times.getHours();
    var mm = times.getMinutes();
    var s = times.getSeconds();
    return y + '-' + repair(m) + '-' + repair(d) + ' ' + repair(h) + ':' + repair(mm) + ':' + repair(s);
  }